Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to avoid flakiness on http helper timeout tests #11345

Merged
merged 1 commit into from
Mar 21, 2019

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Mar 20, 2019

Block the response only during a time or till the context is done.
Close body if a request object is returned.

Fix #11336

Block the response only during a time or till the conext is done.
Close body if a request object is returned.
@jsoriano jsoriano added review Metricbeat Metricbeat flaky-test Unstable or unreliable test cases. Team:Integrations Label for the Integrations team labels Mar 20, 2019
@jsoriano jsoriano self-assigned this Mar 20, 2019
@jsoriano jsoriano requested a review from a team as a code owner March 20, 2019 15:13
@jsoriano
Copy link
Member Author

Not sure if the issue is addressed because I cannot reproduce it locally, I will run CI some times to see if it is fixed.

ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
<-c
select {
case <-time.After(5 * time.Nanosecond):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 nanoseconds?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timeout is set to 1 nanosecond, this is just a higher time.

@jsoriano
Copy link
Member Author

jenkins, test this again

2 similar comments
@jsoriano
Copy link
Member Author

jenkins, test this again

@jsoriano
Copy link
Member Author

jenkins, test this again

@jsoriano
Copy link
Member Author

jenkins, test this a fifth time please

@jsoriano
Copy link
Member Author

It went green for five runs in Jenkins and Travis, merging this.

@jsoriano jsoriano merged commit 2c0b15f into elastic:master Mar 21, 2019
@jsoriano jsoriano deleted the http-helper-flaky branch March 21, 2019 11:43
jsoriano added a commit to jsoriano/beats that referenced this pull request Mar 21, 2019
Block the response only during a time or till the conext is done.
Close body if a request object is returned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Unstable or unreliable test cases. Metricbeat Metricbeat review Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants